﻿<%@ Page Language="C#" MasterPageFile="~/Users/Users.Master" AutoEventWireup="true" CodeBehind="ViewListService.aspx.cs" Inherits="Pantry.Web.Users.ViewListService" Title="Service List" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="UpdatePanelListService">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="CollectionPager" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroupAll" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup0" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup1" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup2" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup3" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup4" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup5" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="LinkGroup6" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="SortByServiceName" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="SortByDes" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="SortByServiceType" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="SortByContact" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="SortByActivated" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="CheckBoxIncludeActivate" EventName="CheckedChanged" />
            <asp:AsyncPostBackTrigger ControlID="RepeaterListService" EventName="ItemCommand" />
        </Triggers>
        <ContentTemplate>
            <div class="g_12 tienvn_panel">
            <div class="widget_header">
                    <h4 class="widget_header_title wwIcon i_16_tables">
                        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
                        <asp:SiteMapPath ID="SiteMapPath1" runat="server">
                        </asp:SiteMapPath>
                        Service List
                    </h4>
                </div>
                <div class="dtBottom">
                    <div class="dtPagination more" style="float:left;margin-left:-15px;">
                        <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_0_paginate">
                            <span><asp:LinkButton ID="LinkGroupAll" Text="All" runat="server" OnClick="LinkGroupAllClick" /></span>
                            <span><asp:LinkButton ID="LinkGroup0" Text="0-9" runat="server" OnClick="LinkGroup0Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup1" Text="A B C D E" runat="server" OnClick="LinkGroup1Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup2" Text="F G H I J" runat="server" OnClick="LinkGroup2Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup3" Text="K L M N" runat="server"  OnClick="LinkGroup3Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup4" Text="O P Q R" runat="server"  OnClick="LinkGroup4Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup5" Text="S T U V" runat="server" OnClick="LinkGroup5Click" /></span> 
                            <span><asp:LinkButton ID="LinkGroup6" Text="W X Y Z" runat="server"  OnClick="LinkGroup6Click" /></span> 
                        </div>
                    </div>
                <div class="active-panel">
                    <asp:CheckBox ID="CheckBoxIncludeActivate" runat="server" CssClass="simple_form abc" AutoPostBack="True" Checked="true"/>
                    <asp:Label runat="server" for="CheckBoxIncludeActivate" Text="Include in-active" />
                </div>
                    <asp:Button ID="ButtonCreate" Text="Create" runat="server" CssClass="buttonCreateDepartment MarginButton" OnClick="ButtonCreateClick" />
                    <asp:Button ID="ButtonCopy" Text="Copy" runat="server" CssClass="buttonCreateDepartment" OnClick="ButtonCopyClick" />
                </div>
                <div style="clear: both;">
                </div>
                <div class="widget_contents noPadding">
                    <table class="tables">
                        <thead>
                            <tr>
                                <th></th>
                                <th class="sorting" style="width:150px;">
                                    <asp:LinkButton ID="SortByServiceName" runat="server" Text="Service Name" OnClick="SortBySerivceNameClick" />
                                </th>
                                <th class="sorting" style="width:180px;">
                                    <asp:LinkButton ID="SortByDes" runat="server" Text="Description" OnClick="SortByDesClick" />
                                </th>
                                <th class="sorting" style="width:80px;">
                                    <asp:LinkButton ID="SortByServiceType" runat="server" Text="Service Type" OnClick="SortByServiceTypeClick" />
                                </th>
                                <th class="sorting" style="width:180px;">
                                    <asp:LinkButton ID="SortByContact" runat="server" Text="Contact" OnClick="SortByContactClick" />
                                </th>
                                <th class="sorting">
                                    <asp:LinkButton ID="SortByActivated" runat="server" Text="Is Active" OnClick="SortByActivatedClick"  />
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Repeater ID="RepeaterListService" runat="server" OnItemCommand="MarkActivated">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <input type="radio" name="RadioGroupNameService" id="RadioGroupNameService" value="<%#Eval("ID") %>"/>
                                        </td>
                                        <td>
                                            <asp:HiddenField ID="HiddenFeildServiceId" runat="server" Value='<%# String.Format("{0}",Eval("ID")) %>' />
                                            <asp:LinkButton ID="LinkButton1" runat="server" Visible='<%#Eval("IsActive").Equals("Yes")? true : false %>'><%#Eval("Name")%></asp:LinkButton>
                                            <asp:LinkButton ID="LinkButton2" runat="server" Visible='<%#Eval("IsActive").Equals("No")? true : false %>' OnClientClick="return confirm('Do you want to make this Service active?');" CommandName="update"><%#Eval("Name")%></asp:LinkButton>
                                        </td>
                                        <td>
                                            <%# Eval("ShortDescription")%>
                                        </td>
                                        <td>
                                            <%# Eval("ServiceType")%>
                                        </td>
                                        <td>
                                            <%# Eval("ContactName")%>
                                        </td>
                                        <td>
                                            <%# Eval("IsActive")%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                    <div class="dtBottom">
                        <div class="dtPagination">
                            <cc1:CollectionPager ID="CollectionPager" runat="server" HideOnSinglePage="false"
                                BackText="Back" FirstText="First" ShowLabel="False" ShowFirstLast="False" NextText="Next"
                                ResultsLocation="None" PageNumbersSeparator=" " PagingMode="PostBack">
                            </cc1:CollectionPager>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
